Skip to content

Colocated final#8

Open
knlnguyen1802 wants to merge 36 commits into
SamitHuang:mainfrom
knlnguyen1802:colocated_final
Open

Colocated final#8
knlnguyen1802 wants to merge 36 commits into
SamitHuang:mainfrom
knlnguyen1802:colocated_final

Conversation

@knlnguyen1802

Copy link
Copy Markdown
Collaborator

No description provided.

SamitHuang and others added 30 commits March 2, 2026 16:32
Signed-off-by: SamitHuang <285365963@qq.com>
Signed-off-by: SamitHuang <285365963@qq.com>
Signed-off-by: SamitHuang <285365963@qq.com>
Signed-off-by: samithuang <285365963@qq.com>
Add rollout backend client and test qwen2.5-0.5b non-colocate training
Signed-off-by: samithuang <285365963@qq.com>
Reorder weight synchronization support for colocate and non-colocate scenarios in the goal plan.
* Draft router design

Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>

* Add vllm router

Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>

* Add router to script

Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>

* Fix gpu memory utilization

Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>

* Fix output token ids

Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>

* Add more nccl flag

Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>

* Fix bug

Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>

---------

Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request integrates vLLM as a rollout backend for Slime, introducing a backend-agnostic architecture with dedicated adapters and a translation sidecar. The changes include refactoring rollout orchestration, generalizing argument names, and decoupling weight synchronization from SGLang-specific dependencies. Feedback identifies several issues, including a hardcoded log path in the vLLM engine, a debugging leftover that overrides rollout offloading settings, and a logic error in connection tracking for request cancellation. Additionally, improvements are suggested for parallelizing remote calls during weight updates and handling pipe closures in the NCCL bridge subprocess.

Comment thread slime/backends/vllm_utils/vllm_engine.py Outdated
Comment thread slime/utils/arguments.py
Comment on lines +227 to +231
try:
ray.get(engine.set_weight_version.remote(self.weight_version))
except Exception as exc:
logger.warning("Failed to set weight version on engine: %s", exc)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

Calling ray.get() inside a loop for each engine serializes the remote calls, which can significantly slow down weight synchronization when multiple engines are used. It is more efficient to collect all remote references and wait for them in parallel.

Suggested change
try:
ray.get(engine.set_weight_version.remote(self.weight_version))
except Exception as exc:
logger.warning("Failed to set weight version on engine: %s", exc)
version_refs = [
engine.set_weight_version.remote(self.weight_version)
for engine in self._colocated_engines
]
if version_refs:
try:
ray.get(version_refs)
except Exception as exc:
logger.warning("Failed to set weight version on engines: %s", exc)

Comment on lines +73 to +74
cmd = conn.recv()
if cmd is None:

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The conn.recv() call in the bridge subprocess should handle EOFError. This ensures that the subprocess exits cleanly if the parent process terminates unexpectedly and the pipe is closed.

Suggested change
cmd = conn.recv()
if cmd is None:
while True:
try:
cmd = conn.recv()
except EOFError:
break

Comment on lines +234 to +235
resp = await self._client.post(url, json=vllm_payload)
self._active_connections.add(resp)

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The resp object is added to _active_connections after the request has already completed (await self._client.post(...)). This makes the tracking ineffective for cancelling in-flight requests during an abort_request call. If connection closing is intended as an abort mechanism, the request needs to be tracked while it is active (e.g., by tracking the asyncio.Task).

Signed-off-by: knlnguyen1802 <knlnguyen1802@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants